Drop GdkColor
authorMatthias Clasen <mclasen@redhat.com>
Fri, 28 Oct 2016 21:08:25 +0000 (17:08 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 1 Nov 2016 17:58:11 +0000 (13:58 -0400)
It is deprecated and no longer used.

docs/reference/gdk/gdk-docs.sgml
docs/reference/gdk/gdk4-sections.txt
gdk/Makefile.am
gdk/deprecated/gdkcolor.c [deleted file]
gdk/deprecated/gdkcolor.h [deleted file]
gdk/gdk.h
gdk/gdkcairo.h
gdk/gdktypes.h

index 19125711c109c32d1a0ed8f38541db4d8d2c03e3..f671c8fd5ed7a44bd94910b2d75cdecf15434825 100644 (file)
@@ -53,7 +53,6 @@
 
   <reference>
     <title>Deprecated</title>
-    <xi:include href="xml/colors.xml" />
     <xi:include href="xml/gdkdevicemanager.xml" />
   </reference>
 
index bbae1d92b499024064a12ac5e9fb62a059a881ec..d4fa3eeff3eff85d191f7f609803caac2619daaf 100644 (file)
@@ -220,24 +220,6 @@ gdk_pixbuf_get_from_window
 gdk_pixbuf_get_from_surface
 </SECTION>
 
-<SECTION>
-<TITLE>Colors</TITLE>
-<FILE>colors</FILE>
-GdkColor
-gdk_color_copy
-gdk_color_free
-gdk_color_parse
-gdk_color_equal
-gdk_color_hash
-gdk_color_to_string
-
-<SUBSECTION Standard>
-GDK_TYPE_COLOR
-
-<SUBSECTION Private>
-gdk_color_get_type
-</SECTION>
-
 <SECTION>
 <TITLE>RGBA Colors</TITLE>
 <FILE>rgba_colors</FILE>
index a84448e4ce98ead33faae2e5eb1a68bae9e11dec..8f0ba00cc2de2f852c6ff4d29ee5d7b95f96b9db 100644 (file)
@@ -92,12 +92,8 @@ gdk_public_h_sources =                               \
        gdkvisual.h                             \
        gdkwindow.h
 
-deprecated_h_sources =                         \
-       deprecated/gdkcolor.h
-
 gdk_h_sources =                                        \
-       $(gdk_public_h_sources)                 \
-       $(deprecated_h_sources)
+       $(gdk_public_h_sources)
 
 gdk_private_headers =                          \
        gdk-private.h                           \
@@ -124,11 +120,7 @@ gdk_private_headers =                              \
        gdkvisualprivate.h                      \
        gdkx.h
 
-deprecated_c_sources =                         \
-       deprecated/gdkcolor.c
-
 gdk_c_sources =                                \
-       $(deprecated_c_sources)                 \
        gdk-private.c                           \
        gdk.c                                   \
        gdkapplaunchcontext.c                   \
diff --git a/gdk/deprecated/gdkcolor.c b/gdk/deprecated/gdkcolor.c
deleted file mode 100644 (file)
index fb45a87..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
- */
-
-#include "config.h"
-
-#include "gdkcolor.h"
-
-#include "gdkscreen.h"
-#include "gdkinternals.h"
-
-#include <time.h>
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-
-/**
- * SECTION:colors
- * @Short_description: Manipulation of colors
- * @Title: Colors
- *
- * A #GdkColor represents a color.
- *
- * When working with cairo, it is often more convenient
- * to use a #GdkRGBA instead, and #GdkColor has been
- * deprecated in favor of #GdkRGBA.
- */
-
-
-/**
- * gdk_color_copy:
- * @color: a #GdkColor
- *
- * Makes a copy of a #GdkColor.
- *
- * The result must be freed using gdk_color_free().
- *
- * Returns: a copy of @color
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-GdkColor*
-gdk_color_copy (const GdkColor *color)
-{
-  GdkColor *new_color;
-
-  g_return_val_if_fail (color != NULL, NULL);
-
-  new_color = g_slice_new (GdkColor);
-  *new_color = *color;
-  return new_color;
-}
-
-/**
- * gdk_color_free:
- * @color: a #GdkColor
- *
- * Frees a #GdkColor created with gdk_color_copy().
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-void
-gdk_color_free (GdkColor *color)
-{
-  g_return_if_fail (color != NULL);
-
-  g_slice_free (GdkColor, color);
-}
-
-/**
- * gdk_color_hash:
- * @color: a #GdkColor
- *
- * A hash function suitable for using for a hash
- * table that stores #GdkColors.
- *
- * Returns: The hash function applied to @color
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-guint
-gdk_color_hash (const GdkColor *color)
-{
-  return ((color->red) +
-          (color->green << 11) +
-          (color->blue << 22) +
-          (color->blue >> 6));
-}
-
-/**
- * gdk_color_equal:
- * @colora: a #GdkColor
- * @colorb: another #GdkColor
- *
- * Compares two colors.
- *
- * Returns: %TRUE if the two colors compare equal
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-gboolean
-gdk_color_equal (const GdkColor *colora,
-                 const GdkColor *colorb)
-{
-  g_return_val_if_fail (colora != NULL, FALSE);
-  g_return_val_if_fail (colorb != NULL, FALSE);
-
-  return ((colora->red == colorb->red) &&
-          (colora->green == colorb->green) &&
-          (colora->blue == colorb->blue));
-}
-
-G_DEFINE_BOXED_TYPE (GdkColor, gdk_color,
-                     gdk_color_copy,
-                     gdk_color_free)
-
-/**
- * gdk_color_parse:
- * @spec: the string specifying the color
- * @color: (out): the #GdkColor to fill in
- *
- * Parses a textual specification of a color and fill in the
- * @red, @green, and @blue fields of a #GdkColor.
- *
- * The string can either one of a large set of standard names
- * (taken from the X11 `rgb.txt` file), or it can be a hexadecimal
- * value in the form “\#rgb” “\#rrggbb”, “\#rrrgggbbb” or
- * “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits of
- * the red, green, and blue components of the color, respectively.
- * (White in the four forms is “\#fff”, “\#ffffff”, “\#fffffffff”
- * and “\#ffffffffffff”).
- *
- * Returns: %TRUE if the parsing succeeded
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-gboolean
-gdk_color_parse (const gchar *spec,
-                 GdkColor    *color)
-{
-  PangoColor pango_color;
-
-  if (pango_color_parse (&pango_color, spec))
-    {
-      color->red = pango_color.red;
-      color->green = pango_color.green;
-      color->blue = pango_color.blue;
-
-      return TRUE;
-    }
-  else
-    return FALSE;
-}
-
-/**
- * gdk_color_to_string:
- * @color: a #GdkColor
- *
- * Returns a textual specification of @color in the hexadecimal
- * form “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits
- * representing the red, green and blue components respectively.
- *
- * The returned string can be parsed by gdk_color_parse().
- *
- * Returns: a newly-allocated text string
- *
- * Since: 2.12
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-gchar *
-gdk_color_to_string (const GdkColor *color)
-{
-  PangoColor pango_color;
-
-  g_return_val_if_fail (color != NULL, NULL);
-
-  pango_color.red = color->red;
-  pango_color.green = color->green;
-  pango_color.blue = color->blue;
-
-  return pango_color_to_string (&pango_color);
-}
diff --git a/gdk/deprecated/gdkcolor.h b/gdk/deprecated/gdkcolor.h
deleted file mode 100644 (file)
index 1ffccbe..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#ifndef __GDK_COLOR_H__
-#define __GDK_COLOR_H__
-
-#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
-#error "Only <gdk/gdk.h> can be included directly."
-#endif
-
-#include <cairo.h>
-#include <gdk/gdktypes.h>
-#include <gdk/gdkversionmacros.h>
-
-G_BEGIN_DECLS
-
-
-/**
- * GdkColor:
- * @pixel: For allocated colors, the pixel value used to
- *     draw this color on the screen. Not used anymore.
- * @red: The red component of the color. This is
- *     a value between 0 and 65535, with 65535 indicating
- *     full intensity
- * @green: The green component of the color
- * @blue: The blue component of the color
- *
- * A #GdkColor is used to describe a color,
- * similar to the XColor struct used in the X11 drawing API.
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-struct _GdkColor
-{
-  guint32 pixel;
-  guint16 red;
-  guint16 green;
-  guint16 blue;
-};
-
-#define GDK_TYPE_COLOR (gdk_color_get_type ())
-
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_get_type)
-GType     gdk_color_get_type (void) G_GNUC_CONST;
-
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_copy)
-GdkColor *gdk_color_copy      (const GdkColor *color);
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_free)
-void      gdk_color_free      (GdkColor       *color);
-
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_hash)
-guint     gdk_color_hash      (const GdkColor *color);
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_equal)
-gboolean  gdk_color_equal     (const GdkColor *colora,
-                               const GdkColor *colorb);
-
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_parse)
-gboolean  gdk_color_parse     (const gchar    *spec,
-                               GdkColor       *color);
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_to_string)
-gchar *   gdk_color_to_string (const GdkColor *color);
-
-
-G_END_DECLS
-
-#endif /* __GDK_COLOR_H__ */
index 3878f10820f698a810843f4a36eb408f369a0b21..4a3b9201eaad573bf459b52d0ccfb5a8995b7a4e 100644 (file)
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
 #include <gdk/gdkvisual.h>
 #include <gdk/gdkwindow.h>
 
-#ifndef GDK_DISABLE_DEPRECATED
-#include <gdk/deprecated/gdkcolor.h>
-#endif
-
 #include <gdk/gdk-autocleanup.h>
 
 #undef __GDK_H_INSIDE__
index ec7b5f5b413b818e061641cf3081154c04320883..1b3b961d3578ece86c48cafd498ac524c1a61c2a 100644 (file)
@@ -23,7 +23,6 @@
 #endif
 
 #include <gdk/gdkversionmacros.h>
-#include <gdk/deprecated/gdkcolor.h>
 #include <gdk/gdkrgba.h>
 #include <gdk/gdkdrawingcontext.h>
 #include <gdk/gdkpixbuf.h>
index 0dac77419adcc353ced9ea37961679573e60222d..a4ce12ba087284a8f175083108c0a32a45723a57 100644 (file)
@@ -129,7 +129,6 @@ typedef struct _GdkAtom            *GdkAtom;
 #define GDK_NONE            _GDK_MAKE_ATOM (0)
 
 /* Forward declarations of commonly used types */
-typedef struct _GdkColor              GdkColor;
 typedef struct _GdkRGBA               GdkRGBA;
 typedef struct _GdkCursor             GdkCursor;
 typedef struct _GdkVisual             GdkVisual;